The present disclosure relates to an image processing device, an image processing method, and a program. In particularly, the disclosure relates to an image processing device, an image processing method, and a program which can readily prevent reduction of an image quality, for example, in noise removal for an image.
For example, as disclosed in Japanese Patent Laid-Open No. 2005-311455, a method of filtering image data by using a conditional average filter such as an ε filter is known as a noise removing filter for efficiently removing a noise contained in image data such as so-called RAW data.
With the ε filter, the noise is removed by averaging a flat portion while an edge of an image is maintained.
That is to say, with the ε filter, for example, pixels corresponding to an objective image as an object of the noise removal are successively selected as a marked pixel to which attention is paid. Also, of peripheral pixels located in the periphery of the marked pixel, the peripheral pixels in each of which an absolute value of a difference in pixel value between corresponding one of the peripheral pixels and the marked pixel falls within a threshold value are each used as an object of the averaging. Also, an average value of the pixel values of the peripheral pixels each becoming an object of the averaging are obtained (the peripheral pixels each becoming the object of the averaging are averaged), and the resulting average value is used as a pixel value of the marked pixel.
For enhancing the effect of the noise removal by using the ε filter, it is known that it is effective to set an offset frequency of the ε filter at a low value.
Now, for example, when a high-sensitivity image is captured by high-speed image capturing (image capturing at a high-speed shutter speed) with a digital camera (such as a digital still camera or a digital video camera), an image (low-S/N ratio image) in which a Signal-to-Noise Ratio (S/N ratio) is remarkably deteriorated is obtained in some cases.
For the purpose of effectively removing the noise from the low-S/N ratio image data, it is necessary that a range of the peripheral pixels used for the filtering by the ε filter is widened, and the filtering by the ε filter is carried out by using a large number of peripheral pixels.
However, when a large number of peripheral pixels are used for the filtering by the ε filter, an amount of arithmetic operation required for the filtering is increased, and a processing time and a hardware scale are eventually increased.
Then, for example, a noise removing method is provided in Japanese Patent Laid-Open No. 2008-153917 (hereinafter referred to as Patent Document 1). In this case, in the noise removing method, a part of peripheral pixels is thinned out with a given pattern (a tap coefficient by which the pixel values of the pixels to be thinned out are multiplied is made zero, whereby the pixel values of the pixels by which the tap coefficient is multiplied are substantially thinned out), and the filtering by the ε filter is carried out by using the pixels after the tinning-out, in a word, a less number of peripheral pixels.
Here, when a part of the peripheral pixels is thinned out, and the filtering by the ε filter is carried out by using the pixels after the tinning-out, a so-called artifact is generated in the image after the filtering by the ε filter due to the thinning-out of the peripheral pixels, and thus the image quality is reduced.
In order to cope with such a situation, with the noise removing method disclosed in Patent Document 1, an image signal of an objective image is divided into a low-frequency component and a high-frequency component in terms of a band. In this case, for the image corresponding to the low-frequency component, the filtering by the ε filter is carried out by using the peripheral pixels after the thinning-out. On the other hand, for the image corresponding to the high-frequency component, the filtering by a median filter is carried out. Also, the image corresponding to the low-frequency component after the filtering, and the image corresponding to the high-frequency component after the filtering are synthesized with each other, thereby obtaining the objective image after the noise removal (post-noise removal image).
With the noise removing method disclosed in Patent Document 1, the peripheral pixels after the thinning-out used for the filtering by the ε filter are the pixels corresponding to the image signal containing therein the low-frequency component. Therefore, it is possible to suppress the artifact (the artifact of the high-frequency component of the objective image) generated in the image after the noise removal due to the thinning-out of the peripheral pixels. Thus, it is possible to obtain the post-noise removal image in which the reduction of the image quality due to the generation of the artifact is prevented.